#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include "StateMachine.h"
#include <iostream>
using namespace sf;
using namespace std;

#define WINDOW_WIDTH 800
#define WINDOW_HEIGHT 600
#define FRAMERATE_LIMIT 50

#include "SoundManager.h"
int main()
{
    // Create window
    sf::RenderWindow window(sf::VideoMode(WINDOW_WIDTH, WINDOW_HEIGHT), "Square World");
    // Limit frame-rate
	window.setFramerateLimit(FRAMERATE_LIMIT);
	window.setVerticalSyncEnabled(true);

	srand (time(NULL));
	StateMachine myStateMachine(&window);
	myStateMachine.init();
	SoundManager sd;
	sd.playSound(fall);
	while(window.isOpen())
    {
		
		myStateMachine.update();
		window.display();
	}
	return 0;
}